The finished program is shown below.
'Calculate cost of fuel 'depending on grade and gallons ' PRINT "How many gallons" INPUT gallons PRINT "What grade (R, E, or S)" INPUT grade$ ' 'Calculate cost ' IF grade$ = "R" THEN PRINT "Cost is", 1.2 * gallons, "dollars" ELSEIF grade$ = "E" THEN PRINT "Cost is", 1.3 * gallons, "dollars" ELSEIF grade$ = "S" THEN PRINT "Cost is", 1.4 * gallons, "dollars" ELSE PRINT "You entered an incorrect grade" END IF END
Could this entire program be put inside of a loop?